//
//  MyAdvertisingViewCell.swift
//  iModern
//
//  Created by Ralf on 6/3/15.
//  Copyright (c) 2015 com.starlooking. All rights reserved.
//

import UIKit

class MyAdvertisingViewCell: AdvertisingCell
{
    override func awakeFromNib()
    {
        super.awakeFromNib()
    }

    override func setSelected(selected: Bool, animated: Bool)
    {
        super.setSelected(selected, animated: animated)
    }

    func setData(data: NSMutableDictionary)
    {
        let advertising = data["article"] as! NSDictionary
        let contact     = advertising["contact"] as! NSDictionary

        setAliasLabel(contact["alias"] as! String)
        setNumberOfFavoritesButton(String(advertising["numberOfFavorites"] as! Int))
        setNumberOfCommentsButton(String(advertising["numberOfComment"] as! Int))
        setAvatarImageView(contact["thumbnailURL"] as? String)
        setPreviewImageView(advertising["imageURL"] as! String)

        setSummaryLabel(advertising["summary"] as! String)
    }
}
